#ifndef ENGINE_H
#define ENGINE_H

#include <boost/shared_ptr.hpp>
#include <string>
#include "scene/scenemanager.h"

using boost::shared_ptr;
using std::string;

namespace engine {
	
	class Application;
	
	namespace core {
		
		using engine::scene::SceneManager;
		
		class Kernel;
		class RenderWindow;
		class Process;
		
		class Engine {
			private:
				shared_ptr<Kernel> m_Kernel;
				shared_ptr<RenderWindow> m_Window;
				shared_ptr<SceneManager> m_SceneManager;
				
				bool loadBaseProcesses();
								
			public:
				Engine();
				virtual ~Engine();
				
				bool initialize(bool createWindow, const string& title = "");
				
				int startEngine();
				void stopEngine();
				
				shared_ptr<RenderWindow> getRenderWindow() {
					return m_Window;
				}
				
				shared_ptr<SceneManager> getSceneManager() { 
					return m_SceneManager; 
				}
				
				shared_ptr<RenderWindow> createRenderWindow(uint width, 
															uint height, 
															bool fullscreen,
															const string& title = "Main Window");
															
				void registerApplication(shared_ptr<Application> app);
				shared_ptr<Kernel> getKernel();
		};
	}
}
#endif
